package com.five.monkey.feign.es.dao.repository;

import com.five.monkey.feign.es.dao.model.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * @author 狻猊
 * @date 2021-11-23 11:12:53
 */
public interface UserRepository extends ElasticsearchRepository<User, Long> {

    List<User> findByStatus(Integer status, Sort sort);

    List<User> findByNameAndStatus(String name, Integer status);

    Page<User> findByStatus(Integer status, Pageable pageable);

}
